Crate wasmtime_wasi_nn
source ·Modules§
- Define the Rust interface a backend must implement in order to be used by this crate. The
Box<dyn ...>
types returned by these interfaces allow implementations to maintain backend-specific state between calls. - This is testing-specific code–it is public only so that it can be accessible both in unit and integration tests.
- Implements the
wasi-nn
API for the WIT (“preview2”) ABI. - Implements the
wasi-nn
API for the WITX (“preview1”) ABI.
Macros§
- Early-return from a test if the test environment is not met. If the
CI
orFORCE_WASINN_TEST_CHECK
environment variables are set, though, this will return an error instead.
Structs§
- A machine learning backend.
- A backend-defined execution context.
- A backend-defined graph (i.e., ML model).
- A container for graphs.
- Capture the state necessary for calling into the backend ML libraries.
Traits§
Functions§
- Construct an in-memory registry from the available backends and a list of
(<backend name>, <graph directory>)
. This assumes graphs can be loaded from a local directory, which is a safe assumption currently for the current model types.